package com.zhiyou.app.service;

import com.github.binarywang.wxpay.bean.notify.WxPayNotifyV3Result;
import com.github.binarywang.wxpay.bean.notify.WxPayRefundNotifyV3Result;
import com.github.binarywang.wxpay.bean.transfer.TransferBillsNotifyResult;
import com.zhiyou.app.pojo.bo.PayResult;
import com.zhiyou.app.pojo.entity.OrderEntity;
import com.zhiyou.app.pojo.enums.RefundStatusEnum;

import javax.servlet.http.HttpServletRequest;
import java.util.concurrent.CompletableFuture;

public interface WechatService {
    String notify(HttpServletRequest request);

    String notifyMa(HttpServletRequest request);

    CompletableFuture<PayResult> waitForPayResult(String payKey, int timeoutSeconds);

    void notifyPayResult(String payKey, boolean success, String message);

    void handleWechatPay(OrderEntity one, WxPayNotifyV3Result wxPayNotifyV3Result);

    void withdrawSuccess(TransferBillsNotifyResult transferBillsNotifyResult);

    void refundSuccess(WxPayRefundNotifyV3Result.DecryptNotifyResult result, RefundStatusEnum parse);
}
